home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2004 August / The Sunday Times - The Month 2004-08.iso / pc / engine / modules / thumbs_halfwidth.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2004-07-02  |  2.3 KB  |  100 lines

  1. function txtOver(mc)
  2. {
  3.    var _loc1_ = mc;
  4.    _loc1_.gotoAndStop("over");
  5.    temp.text = "num = " + _loc1_.num;
  6.    _parent.preview.doOver(_loc1_.num);
  7.    Tardis.sideMenu.doOver(_loc1_.link);
  8. }
  9. function txtOut(mc)
  10. {
  11.    var _loc1_ = mc;
  12.    _loc1_.gotoAndStop("off");
  13.    _parent.preview.doOut(_loc1_.num);
  14.    Tardis.sideMenu.doOut(_loc1_.link);
  15. }
  16. function txtUp(mc)
  17. {
  18.    Tardis.sideMenu.doUp(mc.link);
  19. }
  20. function loadImage(mc, node, extrapath)
  21. {
  22.    var _loc3_ = extrapath;
  23.    if(_loc3_ == null)
  24.    {
  25.       _loc3_ = "";
  26.    }
  27.    var strDefaultPath = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/";
  28.    var _loc1_ = node.firstChild.nodeValue;
  29.    var _loc2_ = node.attributes.path;
  30.    if(_loc2_ != null)
  31.    {
  32.       _loc1_ = _loc2_ + _loc1_;
  33.    }
  34.    else
  35.    {
  36.       _loc1_ = strDefaultPath + _loc3_ + _loc1_;
  37.    }
  38.    if(strPathPrefix == null)
  39.    {
  40.       strPathPrefix = "";
  41.    }
  42.    mc.loadMovie(strPathPrefix + _loc1_);
  43. }
  44. function addLink(mc)
  45. {
  46.    Links[mc.link] = mc;
  47. }
  48. function getMCfromLink(Item)
  49. {
  50.    var _loc1_ = Item;
  51.    if(Links[_loc1_] == null)
  52.    {
  53.       var _loc2_ = [];
  54.       while(_loc1_ != sideMenu.ItemHome)
  55.       {
  56.          _loc2_.unshift(_loc1_._name.split("_").pop());
  57.          _loc1_ = _loc1_._parent._parent;
  58.       }
  59.       var _loc3_ = _loc2_.join("/");
  60.       Links[_loc1_] = Links[_loc3_];
  61.    }
  62.    return Links[_loc1_];
  63. }
  64. function removeLinkListener()
  65. {
  66.    Tardis.sideMenu.EB.removeListener(this);
  67. }
  68. function init()
  69. {
  70.    var _loc3_ = "clip" + nodeData.childNodes.length + "MC";
  71.    attachMovie(_loc3_,"mc_module",++depth);
  72.    mc_module._x = 7;
  73.    mc_module._y = 12;
  74.    var _loc2_ = Tardis.ActiveSection.id;
  75.    var _loc1_ = Tardis.Colors;
  76.    var strColor = _loc1_.getString(_loc2_);
  77.    SECTION_COLOR = _loc1_.getHex(_loc2_);
  78.    DEFAULT_COLOR = _loc1_.getHex("default");
  79.    THUMB_PATH = nodeData.attributes.thumbpath;
  80.    onComplete();
  81. }
  82. function doOver(nm)
  83. {
  84.    mc_module["mc_text_" + (nm - 1)].titleFF.textColor = SECTION_COLOR;
  85. }
  86. function doOut(nm)
  87. {
  88.    mc_module["mc_text_" + (nm - 1)].titleFF.textColor = DEFAULT_COLOR;
  89. }
  90. Links = {};
  91. Tardis.sideMenu.EB.addListener(this);
  92. blnHasPreview = 0;
  93. stop();
  94. onReady();
  95. this.onUnload = function()
  96. {
  97.    removeLinkListener();
  98.    this.onUnload = null;
  99. };
  100.